package order

import (
	"crmeb-common/global"
	"math/big"
)

// MerchantOrder 商户订单表
type MerchantOrder struct {
	global.BaseModel
	OrderNo string `json:"orderNo" gorm:"column=order_no;comment:订单号"`

	MerId int32 `json:"merId" gorm:"column=mer_id;comment:商户ID"`

	Uid int32 `json:"uid" gorm:"column=uid;comment:用户id"`

	RealName string `json:"realName" gorm:"column=real_name;comment:收货人姓名"`

	UserPhone string `json:"userPhone" gorm:"column=user_phone;comment:收货人电话"`

	UserAddress string `json:"userAddress" gorm:"column=user_address;comment:收货详细地址"`

	TotalNum int32 `json:"totalNum" gorm:"column=total_num;comment:订单商品总数"`

	ProTotalPrice big.Float `json:"proTotalPrice" gorm:"column=pro_total_price;comment:商品总价"`

	TotalPostage big.Float `json:"totalPostage" gorm:"column=total_postage;comment:邮费"`

	TotalPrice big.Float `json:"totalPrice" gorm:"column=total_price;comment:订单总价"`

	PayPrice big.Float `json:"payPrice" gorm:"column=pay_price;comment:实际支付金额"`

	PayPostage big.Float `json:"payPostage" gorm:"column=pay_postage;comment:支付邮费"`

	UseIntegral int32 `json:"useIntegral" gorm:"column=use_integral;comment:使用积分"`

	IntegralPrice big.Float `json:"integralPrice" gorm:"column=integral_price;comment:积分抵扣金额"`

	CouponId int32 `json:"couponId" gorm:"column=coupon_id;comment:优惠券id"`

	CouponPrice big.Float `json:"couponPrice" gorm:"column=coupon_price;comment:优惠券金额"`

	PayType string `json:"payType" gorm:"column=pay_type;comment:支付方式:weixin,alipay,yue"`

	PayChannel string `json:"payChannel" gorm:"column=pay_channel;comment:支付渠道：public-公众号,mini-小程序，h5-网页支付,yue-余额，wechatIos-微信Ios，wechatAndroid-微信Android,alipay-支付宝，alipayApp-支付宝App"`

	GainIntegral int32 `json:"gainIntegral" gorm:"column=gain_integral;comment:赠送积分"`

	UserRemark string `json:"userRemark" gorm:"column=user_remark;comment:用户备注"`

	MerchantRemark string `json:"merchantRemark" gorm:"column=merchant_remark;comment:商户备注"`

	ShippingType int32 `json:"shippingType" gorm:"column=shipping_type;comment:配送方式 1=快递 ，2=门店自提"`

	FirstBrokerage big.Float `json:"firstBrokerage" gorm:"column=first_brokerage;comment:一级返佣金额"`

	SecondBrokerage big.Float `json:"secondBrokerage" gorm:"column=second_brokerage;comment:二级返佣金额"`

	CommissionCharge big.Float `json:"commissionCharge" gorm:"column=commission_charge;comment:平台手续费"`

	VerifyCode string `json:"verifyCode" gorm:"column=verify_code;comment:核销码"`

	DeliveryType string `json:"deliveryType" gorm:"column=delivery_type;comment:发货类型：express-快递，fictitious：虚拟发货"`

	IsSplitDelivery bool `json:"isSplitDelivery" gorm:"column=is_split_delivery;comment:是否拆分发货"`

	SeckillId int32 `json:"seckillId" gorm:"column=seckill_id;comment:秒杀商品ID 0-非砍价商品"`

	BargainUserId int32 `json:"bargainUserId" gorm:"column=bargain_user_id;comment:用户砍价活动id 0-没有"`

	BargainId int32 `json:"bargainId" gorm:"column=bargain_id;comment:砍价id 0-没有砍价"`

	PinkId int32 `json:"pinkId" gorm:"column=pink_id;comment:拼团id 0-没有拼团"`

	CombinationId int32 `json:"combinationId" gorm:"column=combination_id;comment:拼团商品id 0-一般商品"`

	ClerkId int32 `json:"clerkId" gorm:"column=clerk_id;comment:核销员id"`

	Type int32 `json:"type" gorm:"column=type;comment:订单类型:0-普通订单，1-视频号订单,2-秒杀订单"`

	MerCouponPrice big.Float `json:"merCouponPrice" gorm:"column=mer_coupon_price;comment:商户优惠券金额"`

	PlatCouponPrice big.Float `json:"platCouponPrice" gorm:"column=plat_coupon_price;comment:平台优惠券金额"`
}
